<?php
// No direct access to this file
defined('_JEXEC') or die;

/**
 * Product component helper.
 */
abstract class ProductHelper
{
	/**
	 * Configure the Linkbar.
	 */
	public static function addSubmenu($submenu)
	{
		JSubMenuHelper::addEntry(JText::_('COM_PRODUCT_SUBMENU_PRODUCTS'),
								 'index.php?option=com_product',
								 $submenu == 'products');
		JSubMenuHelper::addEntry(JText::_('COM_PRODUCT_SUBMENU_CATEGORIES'),
								 'index.php?option=com_categories&extension=com_product',
								 $submenu == 'categories');
		
		// set some global property
		$document = JFactory::getDocument();
		if ($submenu == 'categories')
		{
			$document->setTitle(JText::_('COM_PRODUCT_ADMINISTRATION_CATEGORIES'));
		}
	}
}